<%@ page import="com.mysql.fabric.xmlrpc.base.Data" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="fy.bean.*,java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("utf-8");
String title = request.getParameter("title");
String category = request.getParameter("category");
int homepage = Integer.parseInt(request.getParameter("homepage")); 
String source = request.getParameter("source");
String content = request.getParameter("data");
String picture = request.getParameter("picture");
String author = request.getParameter("author");
String txtDate = request.getParameter("txtDate");
int puton = Integer.parseInt(request.getParameter("puton"));
String externallinks = request.getParameter("externallinks");
String categoryname = request.getParameter("categoryname");

	WhzbBean whzb = new WhzbBean();
	System.out.print("category"+category+"title"+title);
	System.out.println("content"+content);
	System.out.println("externallinks"+externallinks);
	if(whzb.doAdd(category,title,content,homepage,picture,author,source,txtDate,puton,externallinks,categoryname)){
		response.setCharacterEncoding("utf-8");
		 PrintWriter pout = response.getWriter();
		 pout.print("true");
		 pout.flush();
		 pout.close();
		}else{
		 response.setCharacterEncoding("utf-8");
		 PrintWriter pout = response.getWriter();
		 pout.print("false");
		 pout.flush();
		 pout.close();
		 //response.sendRedirect("login.html");
		};

%>